<template>
  <div id="app">
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      router>
      <el-menu-item
        :index="item.path"
        v-for="(item, index) in menuList"
        :key="index">
        {{ item.mate ? (item.mate.title || item.name) : item.name }}
      </el-menu-item>
    </el-menu>
    <router-view class="router"/>
  </div>
</template>
<script>
// import soundBuffer from '@/tools/soundBuffer.js'
// import Recorder from 'js-audio-recorder'
export default {
  name: 'App',
  data() {
    return {
      activeIndex: '/',
      menuList: []
    }
  },
  mounted() {
    this.activeIndex = this.$route.path
    this.menuList = this.$router.options.routes
  },
  methods: {}
}
</script>
<style lang="scss">
.router{
  margin-top: 10px;
}
</style>
